<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        console.log(true&&true);//true
        console.log(1&&true);//true
        console.log(1&&2);//2
        console.log('a'&&2);//2
        console.log(''&&2);//''
        console.log(null&&'b');//null
        console.log('a'&&'b');//b
        console.log(1&&2&&3);//3
        console.log(1&&null&&3);//null
        console.log(''&&null&&0);//''

        console.log(true||true);//true
        console.log(1||true);//1
        console.log(1||2);//1
        console.log('a'||2);//a
        console.log(''||2);//2
        console.log(null||'b');//b
        console.log('a'||'b');//a
        console.log(1||2||3);//1
        console.log(1||null||3);//1
        console.log(''||null||0);//0
        
        
    </script>
</body>
</html>